/* ******************************************************************
 * This file is part of the escal project and distributed under the
 * terms of the GNU General Public License Version 3
 * Copyright (C) 2008 Epocher (xijiaosdq@gmail.com)
 * See COPYING file for licensing information.
 *******************************************************************/

#include "general_config.h"
#include "config_widget.h"
#include <QVBoxLayout>


GeneralConfig::GeneralConfig(QWidget *parent)
	:BaseConfigWindow(parent)
{
	setupUi(this);
	BaseConfigWidget *widget, *tmpWidget;
	
	//*************** task control *********************
	taskControlBoxLayout = new QVBoxLayout(taskControlBox);
	taskControlBox->setLayout(taskControlBoxLayout);

	widget = new BoolConfigWidget("eGear/StartTaskAfterAdded",
		tr("start task automately after added"),taskControlBox);
	taskControlBoxLayout->addWidget(widget);
	widgetList<<widget;

	/* widget = new IntegerConfigWidget("eGear/MaxTaskRunning",
		tr("max task runs at the same time"),1, 20,
		QString(), taskControlBox);
	taskControlBoxLayout->addWidget(widget);
	widgetList<<widget;
	*/
	// ************** clipboard *****************
	clipboardWatchingBoxLayout = new QVBoxLayout(clipboardWatchingBox);
	
	widget = new BoolConfigWidget("eGear/WatchClipboard",
		tr("Watch Clipboard"), clipboardWatchingBox);
	clipboardWatchingBoxLayout->addWidget(widget);
	widgetList<<widget;
	tmpWidget = widget;

	widget = new ListConfigWidget("eGear/WatchedLinksuffixList",
		tr("suffix watched in clipboard"), taskControlBox, 
		(BoolConfigWidget*)tmpWidget);
	clipboardWatchingBoxLayout->addWidget(widget);
	widgetList<<widget;
};

